<?php
class Model_Visits extends Df_Model{
	
	private $db_year_table;
	public function __construct($db_table) {
		$this->db_year_table = $db_table;
		
		$model = new Model_DbTable_Visit();
		$model->setName($db_table);
		
		parent::__construct($model, $id);
	}
	
	public function getUsersByYear($page){
		return $this->_dbTable->fetchAll(
			$this->_dbTable->select ()
			->limitPage($page, 50)
			->order('id DESC')
		);
	}
}